/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package pds_facebook;

import Exceptions.ArestaJaExisteException;
import Exceptions.ArestaNulaException;
import Exceptions.VerticeJaExisteException;
import Exceptions.VerticeNuloException;
import Grafo.*;
import java.util.LinkedList;
import java.util.Scanner;
import pds_facebook.Adapter.GraphPopulator;

public class PDS_Facebook {

    public static void main(String[] args) throws ArestaJaExisteException, VerticeJaExisteException, VerticeNuloException, ArestaNulaException {
        String username;
        String token;
        try (Scanner in = new Scanner(System.in)) {
            System.out.println("Insira o Username do Facebook:");
            username = in.nextLine();
            System.out.println("Insira o token:");
            token = in.nextLine();
        }

        Graph grafo = new GrafoLista();

        GraphPopulator populator = new GraphPopulator(grafo, username, token);

        populator.populate();

        Visitor visitor = new ConcreteVisitor1();
        //Descomentar para usar uma abordagem específica
       //grafo.acceptVisitor(visitor);
      // LinkedList <Vertice> lista= grafo.breadthFirstTraversal(visitor, 0);
        LinkedList <Vertice> lista2=grafo.dephFirstTraversal(visitor, 0);
    }
}
